/*
 * These files are distributed under the terms of the GNU GPLv2, the GNU General
 * Public version 2. See LICENSE.txt
 */
package fileCommodore.plugin.pathHopper;

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.border.*;

/**
 * @author nado18@gmail.com, on Jul 15, 2007
 */
public class PathHopperPart extends JLabel
{
	private static Border hidden = BorderFactory.createEmptyBorder( 1, 1, 1, 1 );
	
	private static Border visible =
			BorderFactory.createLineBorder( SystemColor.controlShadow );
	
	public PathHopperPart(String name)
	{
		super( name );
		
		setBorder( hidden );
		
		addMouseListener( new MouseAdapter()
		{
			@Override
			public void mouseEntered( MouseEvent e )
			{
				setBorder( visible );
				super.mouseEntered( e );
			}
			
			@Override
			public void mouseExited( MouseEvent e )
			{
				setBorder( hidden );
				super.mouseExited( e );
			}
		} );
	}
}
